﻿CREATE TABLE [dbo].[InstanceSetups]
(
	[Id]						[UNIQUEIDENTIFIER]		NOT NULL,
	[TenantId]					[BIGINT]				NULL,
	[AccountId]					[BIGINT]				NULL,
	[CreatedAt]					[DATETIME]				NOT NULL,

	[LayoutName]				[VARCHAR](256)			NULL,
	[ThemeName]					[VARCHAR](256)			NULL,
	[LogoImageBlobId]			[UNIQUEIDENTIFIER]		NULL,
	[ColorForHeader]			[VARCHAR](10)			NULL,
	[ColorForHighlightedArea]	[VARCHAR](10)			NULL,
	[ColorForH1]				[VARCHAR](10)			NULL,
	[ColorForText]				[VARCHAR](10)			NULL,

	CONSTRAINT PK_InstanceSetups PRIMARY KEY ([Id]),
	CONSTRAINT FK_InstanceSetups_Tenants FOREIGN KEY ([TenantId]) REFERENCES [dbo].[Tenants]([Id]),
	CONSTRAINT FK_InstanceSetups_Accounts FOREIGN KEY ([AccountId]) REFERENCES [dbo].[Accounts]([Id]),
	CONSTRAINT FK_InstanceSetups_Blobs FOREIGN KEY ([LogoImageBlobId]) REFERENCES [dbo].[Blobs]([Id])
)
